import {combineReducers} from 'redux'
import {createReducer} from '../../redux/createReducer'

const Home_abc = 'Home_abc'

const store = {
  state: {
    p: 0
  },
  action: {
    abc (params) {
      return {
        type: Home_abc,
        params
      }
    }
  },
  reducer: {
    [Home_abc] (prevState = {}, {type, payload}) {
      return {
        ...prevState,
        p: payload.p
      }
    }
  }
}

export default combineReducers({
  common: createReducer(store)
})

export const action = store.action
